package tgc.edu.ljc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import tgc.edu.ljc.custom.Msg;

@Controller
public class HomeController {
	@RequestMapping(value="/")
	public String index(ModelMap map){
		//UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
		Msg msg=new Msg("测试标题", "测试内容", "额外信息，只对管理员显示");
		map.put("msg", msg);
		return "home";
	}
	
	@RequestMapping(value="/login")
	public String login() {
		return "login";
	}
}
